package kz.pompei.ifacer.visio;

import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
import java.util.Set;

import javax.swing.JComponent;

import kz.pompei.ifacer.grot.CommonField;
import kz.pompei.ifacer.grot.acts.Act;
import kz.pompei.ifacer.model.CursorInfo;
import kz.pompei.ifacer.model.PaintKind;
import kz.pompei.ifacer.model.widgets.Widget;

public interface Visio {
  void paint(Graphics2D g, Widget widget, PaintKind paintKind, Point mouse, Rectangle allSpace)
      throws Exception;
  
  CursorInfo getCursorInfo(Graphics2D g, Widget widget, Point mouse) throws Exception;
  
  Rectangle getWidgetBound(Graphics2D g, Widget widget) throws Exception;
  
  Act move(Graphics2D g, Widget original, Widget copy, Point fromPoint, Point toPoint)
      throws Exception;
  
  Act getDoubleClickAct(Graphics2D g, Widget widget, Point mouse, JComponent owner)
      throws Exception;
  
  Act setProperty(Graphics2D g, Widget widget, WidgetProp prop, int value) throws Exception;
  
  Set<CommonField> getChangableFields(Graphics2D g, Widget widget, Point mouse) throws Exception;
  
  Object getFieldValue(Graphics2D g, CommonField cf, Widget widget, Point mouse) throws Exception;
  
  Act setFieldValue(Graphics2D g, Widget widget, CommonField cf, Object fieldValue, Point mouse)
      throws Exception;
}
